|
some form code.....
Option Explicit
Private Sub Form_Load()
Dim strarray, str As String
Dim v As Variant
Const test As String = "RemAAAARemRm2BBBBRm2Rm3CCCCRm3Rm4DDDDRm4Rm5EEEERm5Rm6FFFFRm6Rm7GGGGRm7Rm8HHHHRm8Rm9JJJJRm9RmAKKKKRmA"
'call function from module returning array of parsed elements from string
strarray = retarray(test)
'populate listbox with parsed elements
For Each v In strarray
If v <> "" Then
Me.List1.AddItem (v)
End If
Next
function called from a module....
Public Function retarray(s As String) As Variant
Dim strarray As Variant
strarray = Split(s, "")
retarray = strarray
End Function
is this what you want
|
|
|
|
|
Hi to you all,
I have to manage a network graph (nodes, links and their attributes),
but I don't know the best way to do it.
I found some examples using arraylist, some other examples using hashtables, while i've been using two dictionaries (nodes and links),
what do you think about that?
the tasks i'd have to perform are basically a conversion from a format to another, to sort the links to a couple of attributes and do some calculations.
thanks in advance!
Fuel2Run
|
|
|
|
|
how do i correctly convert a string containing a 32 bit hex value to a uint32,
i dont have any problem when the integer value of the hex would be a positive value
but im having problems when the hex value would represent a negative integer
|
|
|
|
|
How does a hex value represent a negative integer ? Does it start with a - ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
00000000 to 7FFFFFFF represent positive integer values and FFFFFFFF to 80000000 represent negative integer values
|
|
|
|
|
I thought so. You're trying to take an unsigned number ( FFFFFFF does NOT represent a negative number, necessarily ) and turn it into a signed number. The easiest way to do this would be to cast it, at a guess. Or do the conversion manually.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
as uint32 is not a primative type supported directly by vb.net ive been trying to cast it to other types first but ffffffff always ends up as -1,
i guess ill have to convert it manually to a string representing the unsigned decimal value first
|
|
|
|
|
i have a webservice under C:\Inetpub\wwwroot\RetrieveData\ now i want this web service create a txt file under this folder i have changed the permission of this folder to write as well, but still when i run this webservice i get a exception which is C:\Inetpub\wwwroot\RetrieveData\ the path is denied! how to solve this problem ? pls help me! thank you very much!
I am Entry level person
|
|
|
|
|
The user your web service runs under needs permission to create the file.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Has anyone used My.Settings in VS 2005. According to this[^] article once the settings are in place all I should have to do is type My.Settings. and intellisense should display my config settings. Intellisense it not working for me with My.Settings. Has anyone else ran into this? I'm using V2 2005 Beta 2...maybe it is a problem with the beta and I'll need to get the final release....
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
Hi,
What would be the VB.Net equivalent of these statements?
System.IO.MemoryStream m;
m= (System.IO.MemoryStream)theReport.ExportToStream(
CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
Thanks,
Jamie
|
|
|
|
|
Dim m as System.IO.MemoryStream
m = theReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)
I *think*
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Dim m As System.IO.MemoryStream
m = CType(theReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat), System.IO.MemoryStream)
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant C++: C# to C++ Converter
Instant J#: VB.NET to J# Converter
Clear VB: Cleans up outdated VB.NET code
|
|
|
|
|
DirectCast would be better, more efficient. CType is for changing the type to something completely different. Like an int to a float.
Dim m As System.IO.MemoryStream
m = DirectCast(theReport.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat), System.IO.MemoryStream)
|
|
|
|
|
Yes, provided that you know that the cast target run-time type is exactly System.IO.MemoryStream - otherwise you have an exception. I'm not familiar with CrystalDecisions, however, so I thought CType would be safer.
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant C++: C# to C++ Converter
Instant J#: VB.NET to J# Converter
Clear VB: Cleans up outdated VB.NET code
|
|
|
|
|
Thanks guys. I get it now.
Jamie
|
|
|
|
|
Hi all,
I am new to VB, just writing afew programs as i learn. I made an easy shortcuts program eg. click a button and start a program, i have no problem with iexplorer or firefox but when i try another exe eg.. a game i get this message:-
An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in system.dll
I have tryed Process.start / adding a process component / adding the full path of the file, but nothing.
thanks,
|
|
|
|
|
I've written a windows service that contains some class objects. My problem is that only the code in the OnStart sub will execute. When I do a MyClass.RunThisSub() from inside the OnStart, the code in RunThisSub is not execute. If I copy the same exact code from RunThisSub into the OnStart it runs just fine. It is probably something simple I'm over-looking since this is my first Windows Service....any help would be appreciated.
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
I need to interface with a dll from VB.NET. I have example code of calling a function in that DLL in VBA it is as follows:
Private Declare Function BuildKeyboardList Lib "keyman32" (ByRef pKbdInfo As Any, ByRef pCount As Long) As Long<br />
Private Sub MySub()<br />
Dim xxx As Long = 0<br />
If BuildKeyboardList(ByVal xxx, nLayouts) = 0 Then Exit Sub<br />
...<br />
ReDim KeybdInfo(nLayouts)<br />
If BuildKeyboardList(KeybdInfo(1), nLayouts) = 0 Then Exit Sub<br />
...<br />
End Sub
How do I Declare This Function in VB.NET with an "Any" argument, that sometimes will be a long and other times will be a structure?
How do I Call this function sometimes ByVal and other times ByRef in VB.NET?
Rand
|
|
|
|
|
I don't pretend to know the details of the marshal syntax, but I've found examples for the SendMessage API (which has the last parameter as any in VB6):
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, _
<MarshalAs(UnmanagedType.AsAny)> ByVal lParam As Object) As Integer
Not sure of the ramifications of designating a parameter as unmanaged type but this seems to work in the above example, perhaps you can try it with your API call.
-- modified at 19:30 Monday 31st October, 2005
|
|
|
|
|
I am trying to find a control or a tool that I can use with VB.NET so that the data I retreive from a data base can be displayed on the screen in a form like Excel. For example, suppose I have a form on the screen, like a grid table, with 20 raws and I fill only 15 raws with data. The other 5 raws are empty. In other words, I need a way to display a 20 raws grid table with some of these raws filled with data. Editing of these data is, of course, needed.
Any advice on that ?
|
|
|
|
|
I am trying to upload files to a remote server. If i use Webclient.uploadfile(....) with the <method> POST then i get an error (405) method not allowed. Alternatively, if i use <method> PUT the files are upload well but the program modifies the contents of my files (by adding text into file) hence corrupting my files.
Any ideas or other solutions of getting this done will be highly appreciated.
Qariuki
|
|
|
|
|
I need a to connect to an accesspoint and get the MAC adress using SSH.
Anybody who has done something like this?
|
|
|
|
|
In the following code I need to assign the value for the epfNo(bolded) as variable ... How to make it in a sql query..?
With Adodc1
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
App.Path & "\ot.mdb;Persist Security Info=False"
sqlStr = "select * from OTJob WHERE epfNo='0122'"
.RecordSource = sqlStr
End With
Jena..
|
|
|
|
|
jenagan wrote: With Adodc1
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
App.Path & "\ot.mdbersist Security Info=False"
sqlStr = "select * from OTJob WHERE epfNo='0122'"
.RecordSource = sqlStr
End With
With Adodc1
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
App.Path & "\ot.mdbersist Security Info=False"
sqlStr = "select * from OTJob WHERE epfNo='0122'"
.RecordSource = sqlStr
End With
use this :
Dim strEpfNo = "0122"<br />
sqlStr = "select * from OTJob WHERE epfNo='" & strEpfNo & "'"
R A M
|
|
|
|