|
It looks like you have declared your variables correctly, the reason the messagebox is showing nothing is becasue you haven't assigned them a value.
Try
UserID = "12345"
Messagebox.Show(UserID)
|
|
|
|
|
Yeah,thanks Liqs. I have solve it by converting the data to string instead of boolean when I assign into the variable. This solve my problem,thank you my friend.
Regards
Drex
|
|
|
|
|
Yeah,thanks Guffa. I have solve it by converting the data to string instead of boolean when I assign into the variable. This solve my problem,thank you my friend.
Regards
Drex
|
|
|
|
|
So the problem was not at all in the code that you posted, but in some other code that you didn't post...
Assigning a boolean value to a string variable is such an obvious error. I wonder why I didn't see that by looking at the code that you posted?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
i cant debug my usercontrol i have applied in another solution
settings problem maybe? because i was able to debug before.
if grid.reccount = 0 then
before it would go into the function reccount but now
it just doesnt
please help
tnx in advance
|
|
|
|
|
Either Clean the solution and rebuild or check configuration Manager setting in Build Menu.
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
done cleaning usercontrol solution and the new application soultion
it still doesnt debug they way it was before.
this works
if myfunction() then
but this doesnt
if usercontrol.reccount = 0 then
already set debug build in configuration manager of new application
but still no success
|
|
|
|
|
sources is 8051 MCU
07 01 11 12 13 17 255 128 45 128 0A 01
07 01 as start flag
0A 01 as end flag
11 12 13 17 255 128 45 128 as data
data range is 0-255
8051 sources incessancy
exp
07 01 11 12 13 17 255 120 45 128 0A 01
07 01 12 188 13 17 201 121 46 129 0A 01
07 01 13 111 13 17 200 122 47 130 0A 01
07 01 14 121 13 17 255 123 48 131 0A 01
07 01 16 132 13 17 255 124 49 132 0A 01
.........................................
TEXT2(127)
how to sort in textbox and real refresh correct textbox array place
exp
text2(0)=11
text2(1)=12
.
.
text2(7)=128
text2(8)=12
.
.
---------------mycode----
but not sort in correct place
Private Sub MSComm1_OnComm()
Select Case MSComm1.CommEvent
Case comEvCD
Case comEvCTS
Case comEvDSR
Case comEvRing
Case comEvReceive
Dim b() As Byte
b = MSComm1.Input
Do Until b(lo) = 7
Loop
For ko = 0 To 127
lo = lo + 1
lo = lo Mod 128
Text2(ko).Text = Val(b(lo) * 4 * 0.00488) ??????
Next ko
Case comEvSend
End Select
End Sub
|
|
|
|
|
Currently i am using one key and one value in the app.config. How is it possible that i have one key and mutiple value? How i can loop through the app.config?
|
|
|
|
|
How can I set the focus of to the end of the text in my text box. Clicking on a button
I am populating a text box with code
ie ShowThisText = "This is my Text"
I then set the focus to the text box
ie ShowThisText.setfocus
The cursor by default is at the left of the "This is my Text"
I want to be able to add on to the sentence without having to move to the right to start typing
Any Ideas?
|
|
|
|
|
The code
TextBox1.SelectionStart = TextBox1.TextLength
TextBox1.Focus()
will put the cursor at the end of the text in TextBox1.
|
|
|
|
|
how can i send image exists in picturebox and sending it using array function in VB.NET via GPRS connection.(implemented on pocket pc).
plz it is extremely important
reply me as soon as u can.
thanx anyway.
with regards
|
|
|
|
|
You're not going to graduate from the look of things.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Haha harsh.
but funny!
|
|
|
|
|
if picturebox.image.exists then
My.computer.gprs.send(picturebox.image)
end if
|
|
|
|
|
salam ellayan wrote: plz it is extremely important
Then you better get going on your project
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
Given an Integer which is coded as defined in the following XML, how to compare it with the selected
values on a window form. All Properties can be selected ex. both male and female flag can be on.
Thanks in advance. Hope I have explained the problem correctly.
<employeefeatures>
<feature featuresid="1" bitpos="1" bitcount="1" descr="sex">
<property propertyid="1" val="0" txt="Male" />
<property propertyid="2" val="1" txt="Femele" />
</feature>
<feature featuresid="2" bitpos="2" bitcount="2" descr="agegroup">
<property propertyid="3" val="0" txt="20" />
<property propertyid="4" val="1" txt="30" />
<property propertyid="5" val="2" txt="40" />
</feature>
<feature featuresid="3" bitpos="4" bitcount="1" descr="CompanyCar">
<property propertyid="6" val="0" txt="Yes" />
<property propertyid="7" val="1" txt="No" />
</feature>
<feature featuresid="4" bitpos="5" bitcount="4" descr="status">
<property propertyid="8" val="0" txt="married" />
<property propertyid="9" val="1" txt="unmarried" />
<property propertyid="10" val="2" txt="single" />
<property propertyid="11" val="3" txt="unknown" />
</feature>
</employeefeatures>
|
|
|
|
|
First you need a proper specification of what the xml means exactly. The bitpos value seems to be one based, for example, which is rather non-standard...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi,
Thx for the reply.
The given integer is coded like this ( on the database )
Val*math.Pow(2,Bitpos) or Val*math.Pow(2,Bitpos) .. and so on for each Charac.
When on a windows form selection is made ( interface per xml ) I have to add selected values to an integer and later compare it with the integer from the database.
Hope it is explained now. If not then pls do ask.
|
|
|
|
|
nik050706 wrote: The given integer is coded like this ( on the database )
Val*math.Pow(2,Bitpos) or Val*math.Pow(2,Bitpos) .. and so on for each Charac
In that case the bit position is zero based, so the least significant bit is unused. Is there any special reason for that?
What does your code have to do exactly? Do you only need to write code to do the bit operations, or does it have to parse the xml code and use the bit positions from that to do the calculations?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
this xml is just an example. Actual one is large having more than 70 such properties. This method is applied to save memory as the aplication only works with binary files. This way we have all the properties coded in one int32.
an employee can have a value like 5869586 on the database representing his features and properties.
Now on a windows form many properties can be selected to search for employees. Condition is that employees should be seleted which has atleast one of these properties set.
What i did. I added all the selected properties like this which seems to work
for each Feature in EmployeeFeatures
for each Property in Feature
myint32 = myint32 or Property.Val*math.Pow(2,Property.Bitpos)
next
next
and to compare (5869586 and myint32) > 0
somebody told me i need to shift bits and calculate each val separately
something like myint32 = myint32 or Property.Val >> Property.Bitpos
which is unclear to me and find it tedious
|
|
|
|
|
Hello,
I'm trying to send a few BiDi commands to a printer that I have. I've been researching for a while and found out that in order to do this, I need to use the IBiDiSpl interface, which is documented here:
http://msdn.microsoft.com/en-us/library/ms535480(VS.85).aspx
My problem however, is that I don't know how to use interfaces, especially those that are part of the Windows API, not coded in VB etc...
I have no code regarding this issue (I don't even know where to start) but am somewhat familiar with regular Windows API calls.
Does anyone know how to use this interface in VB.NET 2008?
Thanks,
|
|
|
|
|
Dim s1 As String = "v50"
Dim s2 As String = "v1"
Dim s3 As String = "v7"
If s1 >= s2 And s1 <= s3 Then
MessageBox.Show("True")
Else
MessageBox.Show("false")
End If
from above, i should get false because v50 is bigger than v1 and v7 but it is giving true.
how should i solve this problem.
|
|
|
|
|
It is giving you the correct answer - when you compare strings, "v5x" will always be between "v1x" and "v7x", whatever x is - blank, nonexistent, any character.
If you want it to say that 50 is greater than 7, then you could put the numerical part of your string into an integer field and compare those.
|
|
|
|
|
1 - read a book on programming
2 - once you understand the concepts of a string type, use int.TryParse to do what you want
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|