|
the exit sub woundnt exit the function??????
cause my coding after the form.showdialog have some if else statement also
|
|
|
|
|
You can use Exit Function .
Use it at the correct place, according to you.
Chatura Dilan
|
|
|
|
|
i had try it not working.... if i exit that function... it woundnt run the other coding wat i mean it i just want to PAUSE it at that time when the other form open , when the form is close then continue the next coding.
actually my method is first i use timer to make the object move one by one which is the image according to the location, and then in my function check () to check some condition
--- check condition
...........
ElseIf x = 32 Or x = 56 Then
stime.enabled=false
'if computer turn, on the AI player function in the quiz
If com(Turn).Visible = True Then
quiz2.computer.Text = "on"
End If
quiz2.ShowDialog()
'if player able to win in the quiz move to other location
If x = 32 Then
If quiz2.result.Text = "y" Then
PlayerP(Turn).Location = squarelabel(z + 48).Location
Ppos(Turn).Text = 48
End If
ElseIf x = 56 Then
If quiz2.result.Text = "y" Then
PlayerP(Turn).Location = squarelabel(z + 74).Location
Ppos(Turn).Text = 74
End If
End If
ElseIf Turn >= NumPlayer.Text Then
Turn = 0.........
|
|
|
|
|
how to close the system properly instead of using ctrl+alt+del and end the process??
i try to use me.close to close the form but it didnt 100% close the whole system, might be some of the form was hidden...
|
|
|
|
|
campbells wrote: how to close the system properly
private sub button1_click (byval blablabalasfdas)
end
end sub:->
<blink>FeRtoll Software.net
------------
E-Mail me
WebPage
|
|
|
|
|
|
|
Hi,
Is it possible to remove the last line from the datagrid where you enter new row values (*) but still be able to edit the grid. Basically I want to be able to only edit the datagrid not add any rows to it.
Thanks!
|
|
|
|
|
|
Hi,
I am working on Media File Steam Edition, and want to cut a file into many, and join two files. I am using DirecX9 SDK. I tried hard, but cant go on further with my own knowledge.
Can any knowledged person guide me for the same. I was working on .avi files, but now am thinking of .wmv files.
Any thing that can help me do the coding for joining and cutting media files will do.
Thanks,
Jc Shreyash Singh Parihar
|
|
|
|
|
Trying to work with the tab control in Visual Studio 2005. I am certain I am missing something painfully obvious, but how do I hotkey the tab pages?
Also, can anyone explain how I can move a panel from one tab page to another when a new tab page is selected?
Thanks...
-- modified at 10:50 Tuesday 28th March, 2006
Well, I figured out one of my questions. I can move controls from page to page via the code: [control].Parent = [Tab].SelectedTab
I'm still embarassingly stumped on the hotkey situation however. I will be much obliged when I am appropriately humbled....
|
|
|
|
|
Well, I'm not so embarassed anymore since the solution to my issue is a little trickier than I first imagined. At any rate, in case anyone is ever interested, the class below will create a tab control that can be hot-keyed.
Public Class MnemonicTabControl
Inherits TabControl
Public Sub New()
Me.DrawMode = TabDrawMode.OwnerDrawFixed
End Sub
Protected Overrides Function ProcessMnemonic(ByVal charCode As Char) As Boolean
Dim i As Integer
For i = 0 To TabPages.Count
If (Control.IsMnemonic(charCode, TabPages.Item(i).Text)) Then
Me.SelectedTab = TabPages.Item(i)
Me.Focus()
Return True
End If
Next i
Return False
End Function
Protected Overrides Sub OnDrawItem(ByVal e As DrawItemEventArgs)
MyBase.OnDrawItem(e)
Dim g As Graphics
g = e.Graphics
Dim sf As StringFormat
sf = New StringFormat()
With sf
.HotkeyPrefix = Drawing.Text.HotkeyPrefix.Show
.LineAlignment = StringAlignment.Center
.Alignment = StringAlignment.Center
End With
g.DrawString(Me.TabPages(e.Index).Text, Me.Font, SystemBrushes.WindowText, Me.GetTabRect(e.Index), sf)
End Sub
End Class
|
|
|
|
|
I am getting "Method ~of object ~ failed", when calling a ATL COM object method in my vb+ATL COM App when it is run from VB IDE, however when i run the VB App's Exe ,the vb Form doesn't generate this error:
Thanx in Advance
Z.A
|
|
|
|
|
i encounted this problem while runing my system
An unhandled exception of type 'System.NullReferenceException' occurred in Snake&LadderGame.exe
Object reference not set to an instance of an object.
the error line was at "game.P1.Image = Image.FromFile(imagetoken)"
i have try use break point go through it.. the system did run through those coding and get the value...wonder how come cannnot pass the image..
--------function
'Loading picture from folder
If y = 1 Then
imagetoken = (Path.GetDirectoryName(Application.ExecutablePath) & "\tokenimage\1egg.png")
ElseIf y = 2 Then
imagetoken = (Path.GetDirectoryName(Application.ExecutablePath) & "\tokenimage\2egg.png")
ElseIf y = 3 Then
........
End If
If c = 1 Then
game.P1.Image = Image.FromFile(imagetoken)
game.Player1.Image = Image.FromFile(imagetoken)
ElseIf c = 2 Then
game.P2.Image = Image.FromFile(imagetoken)
game.Player2.Image = Image.FromFile(imagetoken)
ElseIf c = 3 Then
game.P3.Image = Image.FromFile(imagetoken)
game.Player3.Image = Image.FromFile(imagetoken)
ElseIf c = 4 Then
game.P4.Image = Image.FromFile(imagetoken)
game.Player4.Image = Image.FromFile(imagetoken)
End If
-- modified at 3:36 Tuesday 28th March, 2006
|
|
|
|
|
hi,
I think ... if you are getting a problem with only one .png file then it might be that the file format is unrecognised.or the image file is missing....
Apart from that i dont think there shud be any problem.
Hope it helps ...
bye
|
|
|
|
|
I don’t find any errors in your code, but make sure that you declare your game form correctly with New keyword. Like
Dim game As New Form2
Chatura Dilan
|
|
|
|
|
actually it able to work for my perviuos form, but when i try to put it in here it woundnt work, will it becasuse the other form having the same function ?
|
|
|
|
|
Can you explain it more?
Chatura Dilan
|
|
|
|
|
I'm using 2003 .Net. In my program, I want to format the column in Datagrid as "M/d/yyy". how can i format it? Help me!
thank in advance!
tetra
|
|
|
|
|
Use the FORMAT function on the value u are inserting into the datagrid.
e.g Format(txtDate.text, "%M/%d/yyy"), also search in help menu for format function as gives u plenty of examples
hope this helps
Macky100
|
|
|
|
|
I insert to grid at like this
With DGTBCYearEnd
.Width = 72
.HeaderText = HT_YEAR_END
.MappingName = TC_YEAR_END
.NullText = ""
.Format = "%M/%d/yyyy"
End With
Where can i put Format function?
thank in advance!
tetra
|
|
|
|
|
the format function is used to format a value like a txtbox or a datarow or an item in a dataset. i have only used the format function for this purpose. Sorry can't help u with this insertion, b ut maybe u can help me how do u get the .NullText function
Cheers
macky100
|
|
|
|
|
How to increase the maximum number of error count in the error list window of VB.net? By default it's only 100 error per compilation. Iam migrating application from VB6 to VB.Net2005. So, i got more than 1000 errors which can be seen in the upgraded report.html. Am not able to predict the how many errors are corrected or remaining. So please help me.
Rekha
|
|
|
|
|
You probably can increase the number of errors reported, but even if you do, the total number or errors reported is hardly interresting. When you have so many errors in the code, most of them will be the result of previous errors in the code. For an example, if the declaration of a variable contains an error, there will also be an error for every time that variable is used.
---
b { font-weight: normal; }
|
|
|
|
|
I am trying to populate the data from excel in datgrid usin recordset. This piece of code which is not working? Can any body please help me in vb6. Thank You.'****************
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\CHITRA\VBprojects\EXCELREADRECORDSET\ExcelImport.xls;" & _
"Extended Properties=""Excel 8.0;HDR=Yes;"";"
str = "SELECT * FROM [Nov 00 Upload$] "
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.CursorType = adOpenDynamic
rs.Open str, cnn, , adLockOptimistic, adCmdText
If rs.State <> adStateOpen Then
MsgBox "hi"
End If
MsgBox rs.RecordCount
rs.MoveFirst
Set Adodc.Recordset = rs
'*******************************
Chitra Dash
|
|
|
|