气象预报网

您现在的位置是: 首页 > 气象预警

文章内容

天气透明插件_透明天气预报代码

tamoadmin 2024-07-25
1.安卓手机自带的天气预报快捷方式让我删了,怎么复原?2.代表天气状况的符号有几个?1、晴晴,指天空无云或虽有零星云层但云量小于天空面积1/10时的现象。但在生

1.安卓手机自带的天气预报快捷方式让我删了,怎么复原?

2.代表天气状况的符号有几个?

天气透明插件_透明天气预报代码

1、晴

晴,指天空无云或虽有零星云层但云量小于天空面积1/10时的现象。但在生活中也指雨停云散,或有云而仍见阳光时的情况。

2、多云 ?

多云,气象学术语,在天气预报中,“多云”的天气有严格界定,它是指一种可以称之为“晴阴之间”的天气。多云,在气象学上是指天空中云覆盖面占天空十分之四至十分之八。

3、雪

雪:从混合云中降落到地面的雪花形态的固体水。由大量白色不透明的冰晶(雪晶)和其聚合物(雪团)组成的降水。雪是水在空中凝结再落下的自然现象,或指落下的雪;雪是水在固态的一种形式。

扩展资料:

天气符号代表各种天气现象、云状、天空状况等的专用符号。包括供观测记录使用的天气现象符号和供媒体传播使用的天气图形符号。

当气象观测员观测到某种天气现象时,即应在观测簿当日“天气现象”栏记入相应的符号,除少数现象外,并应同时记入其起止时间。以这些符号为基础,结合天气现象的强度、并存关系及某些特征,制定的可以填写在天气图上的一套符号叫填图符号。

为方便公众理解和识别,制定的代表天气现象的一套形象图形供电视或其他公共媒体传播使用。

参考资料:

百度百科-天气符号

安卓手机自带的天气预报快捷方式让我删了,怎么复原?

不知道你说的透明是半透明还是全部透明,提供3个例子给你吧:

半透明窗体(窗体对鼠标点击有反应):

Option Explicit

'Transparancy API's

Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long

Private Declare Function UpdateLayeredWindow Lib "user32" (ByVal hWnd As Long, ByVal hdcDst As Long, pptDst As Any, psize As Any, ByVal hdcSrc As Long, pptSrc As Any, crKey As Long, ByVal pblend As Long, ByVal dwFlags As Long) As Long

Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long

Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Private Const GWL_EXSTYLE = (-20)

Private Const LWA_COLORKEY = &H1

Private Const LWA_ALPHA = &H2

Private Const ULW_COLORKEY = &H1

Private Const ULW_ALPHA = &H2

Private Const ULW_OPAQUE = &H4

Private Const WS_EX_LAYERED = &H80000

Public Function isTransparent(ByVal hWnd As Long) As Boolean

On Error Resume Next

Dim Msg As Long

Msg = GetWindowLong(hWnd, GWL_EXSTYLE)

If (Msg And WS_EX_LAYERED) = WS_EX_LAYERED Then

isTransparent = True

Else

isTransparent = False

End If

If Err Then

isTransparent = False

End If

End Function

Public Function MakeTransparent(ByVal hWnd As Long, ByVal Perc As Integer) As Long

Dim Msg As Long

On Error Resume Next

Perc = 100

If Perc < 0 Or Perc > 255 Then

MakeTransparent = 1

Else

Msg = GetWindowLong(hWnd, GWL_EXSTYLE)

Msg = Msg Or WS_EX_LAYERED

SetWindowLong hWnd, GWL_EXSTYLE, Msg

SetLayeredWindowAttributes hWnd, 0, Perc, LWA_ALPHA

MakeTransparent = 0

End If

If Err Then

MakeTransparent = 2

End If

End Function

Public Function MakeOpaque(ByVal hWnd As Long) As Long

Dim Msg As Long

On Error Resume Next

Msg = GetWindowLong(hWnd, GWL_EXSTYLE)

Msg = Msg And Not WS_EX_LAYERED

SetWindowLong hWnd, GWL_EXSTYLE, Msg

SetLayeredWindowAttributes hWnd, 0, 0, LWA_ALPHA

MakeOpaque = 0

If Err Then

MakeOpaque = 2

End If

End Function

''窗体加载时

Private Sub Form_Load()

MakeTransparent Me.hWnd, 20

End Sub

半透明窗体(对鼠标点击无反应):

Option Explicit

Private Declare Function GetWindowLong Lib "user32" Alias _

"GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long

Private Declare Function SetWindowLong Lib "user32" Alias _

"SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, _

ByVal dwNewLong As Long) As Long

Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, _

ByVal dwFlags As Long) As Long

Private Const GWL_EXSTYLE = (-20)

Private Const WS_EX_LAYERED = &H80000

Private Const WS_EX_TRANSPARENT = &H20&

Private Const LWA_ALPHA = &H2&

'//还有种类似的"窗体" 可以隔着它点击 比如那个窗体是在桌面上,右键点击窗体,就是再右击桌面,好多桌面时钟呀~ 天气预报~什么都那样,这是怎么做的?

'请参考MSDN关于WS_EX_TRANSPARENT扩展样式的示例:

'://support.microsoft/default.aspx?scid=kb;en-us;249341

' --- 代码 ---

Private Sub Form_Load()

Dim lOldStyle As Long

Dim bTrans As Byte ' The level of transparency (0 - 255)

bTrans = 128

lOldStyle = GetWindowLong(Me.hwnd, GWL_EXSTYLE)

SetWindowLong Me.hwnd, GWL_EXSTYLE, lOldStyle Or WS_EX_LAYERED Or WS_EX_TRANSPARENT

SetLayeredWindowAttributes Me.hwnd, 0, bTrans, LWA_ALPHA

End Sub

透明窗体(完全看不见):

Option Explicit

Private Declare Function SetWindowLong Lib "user32" _

Alias "SetWindowLongA" _

(ByVal hwnd As Long, _

ByVal nIndex As Long, _

ByVal dwNewLong As Long) _

As Long

Private Declare Function GetWindowLong Lib "user32" _

Alias "GetWindowLongA" _

(ByVal hwnd As Long, _

ByVal nIndex As Long) _

As Long

Private Const GWL_EXSTYLE = (-20)

Private Const LWA_ALPHA As Long = &H2

Private Const WS_EX_LAYERED As Long = &H80000

Private Declare Function SetLayeredWindowAttributes Lib "user32" _

(ByVal hwnd As Long, _

ByVal crKey As Long, _

ByVal bAlpha As Long, _

ByVal dwFlags As Long) _

As Long

Private Sub Form_Load()

Dim p As Long

p = GetWindowLong(Me.hwnd, GWL_EXSTYLE) '取得当前窗口属性

Call SetWindowLong(Me.hwnd, GWL_EXSTYLE, p Or WS_EX_LAYERED)

'加上一个透明属性

Call SetLayeredWindowAttributes(Me.hwnd, 0, 0, LWA_ALPHA)

End Sub

这些代码都是本人平时积累的,经试验可用.

这里还有一个文本框透明的例子,也许对你有用:

Option Explicit

Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long

Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long

Private Const WS_EX_LAYERED = &H80000

Private Const GWL_EXSTYLE = (-20)

Private Const LWA_ALPHA = &H2

Private Const LWA_COLORKEY = &H1

Private Sub Form_Load()

Text1.BackColor = vbBlue

Dim rtn As Long

rtn = GetWindowLong(hwnd, GWL_EXSTYLE)

rtn = rtn Or WS_EX_LAYERED

SetWindowLong hwnd, GWL_EXSTYLE, rtn

SetLayeredWindowAttributes hwnd, vbBlue, 0, LWA_COLORKEY

End Sub

不知这些符不符合你的要求.

代表天气状况的符号有几个?

各版本的操作系统不一样,软件也不一样,因此设置桌面快捷方式也有可能不一样。

不过最终都可以通过开发工具,直接写代码来创建快捷方式:

1.创建图标代码如下:

<activity?android:name=".MainActivity">

<intent-filter>

<action?android:name="android.intent.action.CREATE_SHORTCUT"/>

</intent-filter>

</activity>

此处就是表示向桌面创建一个快捷方式:

2.接下来就是就是设置快捷方式的图标、名称、等属性。

public?void?createShortCut(){

Intent?addShortCut;

if(getIntent().getAction().equals(Intent.ACTION_CREATE_SHORTCUT)){//判断是否需要添加快捷方式

addShortCut?=?new?Intent();

addShortCut.putExtra(Intent.EXTRA_SHORTCUT_NAME?,?"快捷方式");//快捷方式的名称

Parcelable?icon?=?ShortcutIconResource.fromContext(this,?R.drawable.icon);//显示的

addShortCut.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,?icon);//快捷方式激活的activity,需要执行的intent,自己定义

addShortCut.putExtra(Intent.EXTRA_SHORTCUT_INTENT,?new?Intent());

setResult(RESULT_OK,?addShortCut);//OK,生成

}else{//取消

setResult(RESULT_CANCELED);

}

}

3.向桌面再增加一个图标

Intent?shortcut?=?new?Intent("com.android.launcher.action.INSTALL_SHORTCUT"); //快捷方式的名称

shortcut.putExtra(Intent.EXTRA_SHORTCUT_NAME,?getString(R.string._name));

shortcut.putExtra("duplicate",?false);?//不允许重复创建

//指定当前的Activity为快捷方式启动的对象:?如?com.everest.video.VideoPlayer

//注意:?ComponentName的第二个参数必须加上点号(.),否则快捷方式无法启动相应程序

// ComponentName?comp?=?new?ComponentName(this.getPackageName(),?"."+this.getLocalClassName());

// shortcut.putExtra(Intent.EXTRA_SHORTCUT_INTENT,?new?Intent(Intent.ACTION_MAIN).setComponent(comp));

shortcut.putExtra(Intent.EXTRA_SHORTCUT_INTENT,?new?Intent(this,WXEntryActivity.class));//快捷方式的图标

ShortcutIconResource?iconRes?=?Intent.ShortcutIconResource.fromContext(this,?R.drawable.ic_launcher);

shortcut.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,?iconRes);

sendBroadcast(shortcut);

代表各种天气现象、云状、天空状况等的专用符号。包括供观测记录使用的天气现象符号和供媒体传播使用的天气图形符号。常见的天气标志有:

1、下图中是常见雨的天气符号,从左到右分别为小雨、中雨、大雨。

2、下图中的天气符号分别表示晴、多云、阴。

3、下图中的三个天气符号分别是暴雨、冰雹和雷阵雨。

4、下图中的三个天气符号分别是雨夹雪、小雪、中雪。

扩展资料:

常用术语:

晴:天空云量不足3成。

阴:天空云量占9成或以上。

雾:近地面空中浮游大量微小的水滴或冰晶,水平能见度下降到1公里以内,影响交通运输。

小雨:日降水量不足10毫米。

大雨:日降水量25.0—49.9毫米。

雷阵雨:忽下忽停并伴有电闪雷鸣的阵性降水。

冰雹:小雹核随着积雨云中激烈的垂直运动,反复上升凝结下降融化,成长为透明层相间的小冰块降落,对农作物有影响。

冻雨:雨滴冻结在低于0℃的物体表面的地面上,又称雨淞(由雾滴冻结的,称雾凇),常坠断电线,使路面结冰,影响通信、供电、交通等。

百度百科—天气预报