Click here to Skip to main content
15,886,518 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralUnable to show data in datagridview Pin
hisuman1004-Apr-08 20:21
hisuman1004-Apr-08 20:21 
GeneralRe: Unable to show data in datagridview Pin
Rupesh Kumar Swami4-Apr-08 20:53
Rupesh Kumar Swami4-Apr-08 20:53 
GeneralRe: Unable to show data in datagridview Pin
hisuman1004-Apr-08 21:30
hisuman1004-Apr-08 21:30 
GeneralRe: Unable to show data in datagridview Pin
Rupesh Kumar Swami4-Apr-08 22:17
Rupesh Kumar Swami4-Apr-08 22:17 
AnswerRe: Unable to show data in datagridview Pin
MBCDC4-Apr-08 23:00
MBCDC4-Apr-08 23:00 
GeneralPop Up Form Pin
Socheat.Net4-Apr-08 18:52
Socheat.Net4-Apr-08 18:52 
GeneralRe: Pop Up Form Pin
Rupesh Kumar Swami4-Apr-08 20:49
Rupesh Kumar Swami4-Apr-08 20:49 
AnswerRe: Pop Up Form Pin
Rajesh Anuhya4-Apr-08 23:36
professionalRajesh Anuhya4-Apr-08 23:36 
see this below code, which is generate a popup form at runtime.

This code from my DLL application ,

Imports System.Windows.Forms
Imports System.Drawing
Imports System.Drawing.Drawing2D
'===================================================
'
' Module : Atm_rs232_GSMGPRS

' Description : Class for handling RS232 communication with VB.Net 2005 and
' sending SMS and Data Dialing through Serial Port

' Created : 26/04/2007 08:30:00

' Author : Rajesh B ---A poor workman blames his tools---

' Company : Analogics Tech. India Limited. Hyderabad.
''-----------------------------------------------------------------------------------------------

Public Class AnalogicWindows
Public SMSPopupform As New Form
Public SMSPopupPICBOX As New PictureBox
Public analink As New LinkLabel
Public footlbl As New Label
Public popuptext As New Label
Public backcolor1 As New Color
Public backcolor2 As New Color


Private smsimg As Bitmap = New Bitmap(Application.StartupPath & "\images\sms.bmp")
Private portimg As Bitmap = New Bitmap(Application.StartupPath & "\images\port.bmp")
'//////////////////////////////////////////////////
' Method: getlinklabl
' FullName: AnalogicWindows.getlinklabl
' Access: public
' Returns: String)
' Parameter: ByVal popuptextmsg As String
'//////////////////////////////////////////////////
Public Sub getlinklabl(ByVal popuptextmsg As String)
'analink.AutoSize = True
'analink.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
'analink.LinkColor = System.Drawing.Color.Red
'analink.Location = New System.Drawing.Point(154, 85)
'analink.Name = "LinkLabel1"
'analink.Size = New System.Drawing.Size(224, 17)
'analink.TabIndex = 0
'analink.TabStop = True
'analink.Text = "http://analogicgroup.com"
'analink.BackColor = Color.Transparent



'footlbl.AutoSize = True
'footlbl.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
'footlbl.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
'footlbl.ForeColor = System.Drawing.Color.White
'footlbl.Location = New System.Drawing.Point(58, 105)
'footlbl.Name = "Label2"
'footlbl.Size = New System.Drawing.Size(192, 16)
'footlbl.TabIndex = 3
'footlbl.Text = "ANALOGIC CAMR Network Server 2.0"
'footlbl.BackColor = Color.Transparent


popuptext.BackColor = Color.Transparent
popuptext.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
popuptext.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
popuptext.ForeColor = System.Drawing.Color.WhiteSmoke
popuptext.Location = New System.Drawing.Point(56, 18)
popuptext.Name = "RichTextBox1"
popuptext.Size = New System.Drawing.Size(210, 57)
popuptext.TabIndex = 4
popuptext.Text = popuptextmsg



End Sub
''SMSPopup Properties
'//////////////////////////////////////////////////
' Method: Generate_SMSPopup
' FullName: AnalogicWindows.Generate_SMSPopup
' Access: public
' Returns: String, ByVal Showtext As String)
' Parameter: ByVal Maintitle As String
' Parameter: ByVal Showtext As String
'//////////////////////////////////////////////////
Public Sub Generate_SMSPopup(ByVal Maintitle As String, ByVal Showtext As String)
Dim octform As Double
Call getlinklabl(Showtext)
backcolor1 = Color.Pink
backcolor1 = Color.LightBlue
SMSPopupform.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
SMSPopupform.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
SMSPopupform.BackColor = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(255, Byte), Integer))
SMSPopupform.ClientSize = New System.Drawing.Size(350, 130)
SMSPopupform.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
SMSPopupform.Location = New System.Drawing.Point(674, 612)
SMSPopupform.Name = "Form1"
SMSPopupform.StartPosition = System.Windows.Forms.FormStartPosition.Manual
SMSPopupform.Text = Maintitle
SMSPopupform.ResumeLayout(False)
SMSPopupform.ShowInTaskbar = False
SMSPopupform.TopMost = True

'' For Picture box
'SMSPopupPICBOX.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
SMSPopupPICBOX.Location = New System.Drawing.Point(1, 0)
SMSPopupPICBOX.Name = "PictureBox1"
SMSPopupPICBOX.Size = New System.Drawing.Size(125, 110)
'SMSPopupPICBOX.Image = newimg.GetThumbnailImage(79, 39, Nothing, Nothing)
SMSPopupPICBOX.Image = smsimg
'SMSPopupPICBOX.Load(Application.StartupPath & "\temp.bmp")
SMSPopupPICBOX.TabStop = False

SMSPopupform.Controls.Add(footlbl)
SMSPopupform.Controls.Add(SMSPopupPICBOX)
SMSPopupform.Controls.Add(analink)
SMSPopupform.Controls.Add(popuptext)

AddHandler SMSPopupform.Paint, AddressOf SMSPopup

SMSPopupform.Show()

For octform = 0 To 100 Step 0.06
SMSPopupform.Opacity = octform / 100
System.Threading.Thread.Sleep(0)
Application.DoEvents()
Next

SMSPopupform.Location = New System.Drawing.Point(674, 612)
Delay(800)
For octform = 100 To 0 Step -0.06
SMSPopupform.Opacity = octform / 100
System.Threading.Thread.Sleep(0)
Application.DoEvents()
Next
SMSPopupform.Hide()
End Sub
''SMSPopup Properties
'//////////////////////////////////////////////////
' Method: Generate_PortPopup
' FullName: AnalogicWindows.Generate_PortPopup
' Access: public
' Returns: String, ByVal Porttext As String)
' Parameter: ByVal Maintitle As String
' Parameter: ByVal Porttext As String
'//////////////////////////////////////////////////
Public Sub Generate_PortPopup(ByVal Maintitle As String, ByVal Porttext As String, ByVal imgtype As Integer)
Dim backBG As Bitmap = New Bitmap(Application.StartupPath & "\images\PopUp-BG.gif")
Dim popuppic As Bitmap
If imgtype = 1 Then
popuppic = New Bitmap(Application.StartupPath & "\images\Cable-detected.gif")
ElseIf imgtype = 2 Then
popuppic = New Bitmap(Application.StartupPath & "\images\CableUnpluged_Anim.gif")
Else
popuppic = New Bitmap(Application.StartupPath & "\images\CableBUSY_anim.gif")
End If

Dim octform As Double
Call getlinklabl(Porttext)
backcolor1 = Color.GreenYellow
backcolor1 = Color.Violet
SMSPopupform.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
SMSPopupform.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
'SMSPopupform.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(128, Byte), Integer))
SMSPopupform.ClientSize = New System.Drawing.Size(300, 94)
SMSPopupform.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
SMSPopupform.Location = New System.Drawing.Point(725, 640)
SMSPopupform.Name = "Form1"
SMSPopupform.StartPosition = System.Windows.Forms.FormStartPosition.Manual
SMSPopupform.Text = Maintitle
SMSPopupform.ResumeLayout(False)
SMSPopupform.ShowInTaskbar = False
SMSPopupform.TransparencyKey = System.Drawing.SystemColors.ButtonFace
SMSPopupform.BackgroundImage = backBG
SMSPopupform.TopMost = True

'' For Picture box
'SMSPopupPICBOX.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
SMSPopupPICBOX.Location = New System.Drawing.Point(4, 0)
SMSPopupPICBOX.Name = "PictureBox1"
SMSPopupPICBOX.Size = New System.Drawing.Size(74, 92)
SMSPopupPICBOX.Image = popuppic
SMSPopupPICBOX.TabStop = False

'SMSPopupPICBOX.Image = portimg

'SMSPopupform.Controls.Add(footlbl)
SMSPopupform.Controls.Add(SMSPopupPICBOX)
'SMSPopupform.Controls.Add(analink)
SMSPopupform.Controls.Add(popuptext)

'SMSPopupPICBOX.ImageLocation = Application.StartupPath & "\temp.bmp"
SMSPopupform.Show()

For octform = 0 To 100 Step 0.06
SMSPopupform.Opacity = octform / 100
Application.DoEvents()
Next

SMSPopupform.Location = New System.Drawing.Point(725, 640)
Delay(2000)
For octform = 100 To 0 Step -0.06
SMSPopupform.Opacity = octform / 100
Application.DoEvents()
Next
SMSPopupform.Hide()
End Sub

'//////////////////////////////////////////////////
' Method: SMSPopup
' FullName: AnalogicWindows.SMSPopup
' Access: public
' Returns: Object, ByVal e As System.Windows.Forms.PaintEventArgs)
' Parameter: ByVal sender As Object
' Parameter: ByVal e As System.Windows.Forms.PaintEventArgs
'//////////////////////////////////////////////////
Public Sub SMSPopup(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs)
Dim mp As GraphicsPath = New GraphicsPath()
Dim myrect As New Rectangle(0, 0, SMSPopupform.Width, SMSPopupform.Height)
Dim c1, c2, c3, c4 As Color
c1 = Color.Black
c2 = Color.Transparent
c3 = backcolor1
c4 = backcolor2
Dim mypenbrush As New LinearGradientBrush(myrect, c1, c2, LinearGradientMode.Vertical)
Dim mybrush As New LinearGradientBrush(myrect, c3, c4, LinearGradientMode.ForwardDiagonal)
Dim mypen As New Pen(mypenbrush, 10)
Dim itpen As New Pen(Color.Transparent)
Dim myfont As New Font("Arial", 25, FontStyle.Bold)
e.Graphics.DrawRectangle(mypen, myrect)
e.Graphics.FillRectangle(mybrush, myrect)
'e.Graphics.DrawImage(PictureBox1.Image, 0, 0)
mp.AddRectangle(myrect)
SMSPopupform.Region = New Region(mp)
End Sub
'//////////////////////////////////////////////////
' Method: graphCalendarDateToXLDate
' FullName: AnalogicWindows.graphCalendarDateToXLDate
' Access: public
' Returns: Double
' Parameter: ByVal year As Integer
' Parameter: ByVal month As Integer
' Parameter: ByVal day As Integer
' Parameter: ByVal hour As Integer
' Parameter: ByVal minute As Integer
' Parameter: ByVal second As Integer
' Parameter: ByVal millisecond As Double
'//////////////////////////////////////////////////
Public Function graphCalendarDateToXLDate(ByVal year As Integer, ByVal month As Integer, ByVal day As Integer, ByVal hour As Integer, ByVal minute As Integer, ByVal second As Integer, ByVal millisecond As Double) As Double
Dim ms As Double = millisecond
graph_NormalizeCalendarDate(year, month, day, hour, minute, second, ms)
Return graph_CalendarDateToXLDate(year, month, day, hour, minute, second, ms)
End Function

End Class

Rajesh B --> A Poor Workman Blames His Tools <--

GeneralRe: Pop Up Form Pin
Dave Kreskowiak5-Apr-08 13:37
mveDave Kreskowiak5-Apr-08 13:37 
GeneralRe: Pop Up Form Pin
Mycroft Holmes5-Apr-08 17:53
professionalMycroft Holmes5-Apr-08 17:53 
QuestionHow to design dataTables or DataSets for forms on different panels Pin
AAGTHosting4-Apr-08 16:23
AAGTHosting4-Apr-08 16:23 
AnswerRe: How to design dataTables or DataSets for forms on different panels Pin
Ashish Sehajpal4-Apr-08 23:48
Ashish Sehajpal4-Apr-08 23:48 
GeneralRe: How to design dataTables or DataSets for forms on different panels Pin
Mycroft Holmes5-Apr-08 17:50
professionalMycroft Holmes5-Apr-08 17:50 
QuestionHow Can i start? Pin
hassandot4-Apr-08 9:17
hassandot4-Apr-08 9:17 
AnswerRe: How Can i start? Pin
Dave Kreskowiak4-Apr-08 9:39
mveDave Kreskowiak4-Apr-08 9:39 
GeneralRe: How Can i start? Pin
hassanasp4-Apr-08 10:45
hassanasp4-Apr-08 10:45 
GeneralRe: How Can i start? Pin
Luc Pattyn4-Apr-08 12:07
sitebuilderLuc Pattyn4-Apr-08 12:07 
GeneralSaving Data Pin
tibmark4-Apr-08 7:23
tibmark4-Apr-08 7:23 
GeneralRe: Saving Data Pin
Dave Kreskowiak4-Apr-08 8:12
mveDave Kreskowiak4-Apr-08 8:12 
GeneralRe: Saving Data Pin
tibmark4-Apr-08 8:19
tibmark4-Apr-08 8:19 
GeneralRe: Saving Data Pin
Dave Kreskowiak4-Apr-08 9:36
mveDave Kreskowiak4-Apr-08 9:36 
GeneralRe: Saving Data Pin
jzonthemtn4-Apr-08 8:33
jzonthemtn4-Apr-08 8:33 
GeneralRe: Saving Data Pin
tibmark4-Apr-08 8:40
tibmark4-Apr-08 8:40 
GeneralRe: Saving Data Pin
A Wong4-Apr-08 8:57
A Wong4-Apr-08 8:57 
GeneralVB.net/excel/access - problem with strings and dates Pin
AHeavey4-Apr-08 6:59
AHeavey4-Apr-08 6:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.