|
For all I know the type of parameters three and four (string) should be LPSTR.
void myfunction(long * param_one, long param_two,LPSTR * param_three,LPSTR * param_four)
. . . we have same problem encountered when i create a dll in VC++, and it works when I used LPSTR, u can try this.
I hope it helps
|
|
|
|
|
Yes, I've already read that somewhere, but the problem is I can't modify the DLL...
Thanks anyway.
|
|
|
|
|
Hi!
Is it legal to extract icons from Microsoft applications such as MS Office and XP
for use in my own application.
Theres a lot of free tools to extract these icons out there, but nobody seems to care about legal rights.
I'll be happy for a straight answer here
Thanks in advance
bomstrong
|
|
|
|
|
The icons provided with Visual studio are free to use. If you extract the icons from word or some other application, you can assume you are violating the copyright unless you have written permission from Microsoft to do so.
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
Thanks for Your quick answar - I'll try to create my own icons instead!
Regards
bomstrong
|
|
|
|
|
hi all,
searching the internet for printing/converting an Excel file into PDF let me to the following code.
<br />
Dim oXL As Excel.Application<br />
Dim oWB As Excel.Workbook<br />
Dim oSheet As Excel.Worksheet<br />
Dim oRng As Excel.Range<br />
<br />
' Start Excel and get Application object.<br />
Set oXL = CreateObject("Excel.Application")<br />
oXL.Visible = True<br />
<br />
' do other things with the oSheet object<br />
oSheet.PrintOut Copies:=1, ActivePrinter:="Adobe PDF on Ne01:"<br />
but after some error messages I discovered that on my machine the ActivePrinter:="Adobe PDF on Ne01:" should rather have Ne02 in it.
Is there a programmatic way to find/set the correct ActivePrinter property on a machine. Adding a loop for "Ne0" + i doesn't look elegant.
thanx in advance
|
|
|
|
|
I use picturebox in a winform. Like this,
PictureBox1.load(strImagefile)
After testing some picture files, I found that if the imsgefile format is .ico, there will has error when you load twice the image.
Is this a bug of .net 2005 beta2?
Thanks!
|
|
|
|
|
If you use the Load method of the PictureBox, this keeps the file it loads locked open.
See this[^] KB article on MSDN for more information and how to get around the situation.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Then, how to reload the picturebox.image?
|
|
|
|
|
Reload the file, as explained in the link!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello everybody,
whenever I run any VB program (like Hello world, datepicker) which outputs message in a message box, the content is always blank, even a simple notification comes out blank, the problem is that the msgbox does appears, the string seems to have been written (the size of the msgbox changes depending on the lenght of the message) but it is not visible.
can anyone tell me why this is happening, and how to fix it
Thanks
Ignorance is darkness.
Knowledge is light.
|
|
|
|
|
hi,
please put in your code here.
thanx
|
|
|
|
|
Yes, I agree with Anonynous - please show us your code. In the meantime, you haven't set the text (font) colour and the background colours to be the same thus making the text effectively 'invisible'?
...Steve
|
|
|
|
|
This is the code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("your birthdate was " & DateTimePicker1.Text)
MsgBox("day of the year: " & _
DateTimePicker1.Value.DayOfYear.ToString())
MsgBox("Today is " & DateTimePicker1.Value.Now.ToString())
End Sub
I've checked the font color (Black) and background color (Transparent)
I've read that it might be something to do with McAfee and their buffer overflow protection. I'm trying to find a patch which McAfee has made availabel but I can't seem to find it right now, if you know the url, could you please let me know what it is?
Thanks
Ignorance is darkness.
Knowledge is light.
|
|
|
|
|
I Googled "mcafee blank msgbox" and see a whole heap of hits for this problem. McAfee Viruscan 8.0 Patch 10 fixes it. I don't have a URL for the patch as I get it automatically. Try www.mcafee.com.
...Steve
|
|
|
|
|
Check this:
Public Class Params
Private Shared iParam As Integer
Public Structure ParamFields
Public FieldArray() As String
Public Const Value1 As Integer = 1
Public Const Value2 As Integer = 2
End Structure
Public Function Value(ByVal sequenceID As Integer, ByVal routinID As Integer) As ParamFields
'This is where some action must be carried out before I read Value1 and Value2.
'Using a structure in this way is only way to accoumplish this I think?????
End Function
End Class
I use it like this :
------------------------------------
dim oParam as new Params
msgbox(oParam.Value(10,11).Value1)
------------------------------------
In this example Value1, Value2 is constants but they can change depening on what I pass to Value-function.
My question ... Can I retrieve Value1 by using:
-------------------------------------------------
dim oParam as new Params
msgbox(oParam.Value(10,11))
-------------------------------------------------
i.e use Value1 as default trough ToString or something else? any suggestions?
Regards // Maw
|
|
|
|
|
I don't think you can use a structure this way. It would be problematic especially if the struture's internal structure changed.
A better method would be to define Value1 and Value2 as Properties of the Params class. In this way the call to the Value() method would set these properties and you'd need to code Property Get methods for both Value1 and Value2.
Public Class Params<br />
<br />
Private Shared iParam As Integer<br />
<br />
Private m_nValue1 as Integer<br />
Private m_nValue2 as Integer<br />
<br />
Property Get Value1() as Integer<br />
Value1 = m_nValue1<br />
End Property<br />
<br />
Property Get Value2() as Integer<br />
Value2 = m_nValue2<br />
End Property<br />
<br />
Public Sub Value(ByVal sequenceID As Integer, ByVal routinID As Integer)<br />
' code to calculate m_nValue1 and m_nValue2. set to constants in this sample.<br />
m_nValue1 = 1<br />
m_nValue2 = 2<br />
End Sub<br />
<br />
End Class
You can then use the Params class like this:
Dim oParam as Params<br />
Set oParams = New Params<br />
<br />
oParams.Value(x,y)<br />
<br />
Msgbox(oParam.Value1)<br />
A bit more coding but has the advantage of being easier to read, test and understand.
...Steve
|
|
|
|
|
i have been coding my 8 led's thru parallel port using visual basic and now i must sent the notification to PDA user..but i don't know to code it and using what language.
example : first led on, then the signal sent to PDA user appear as a message to tell user first led is on. anyone can help me to solve that problems.
help me plsssssssssssssss.......
thank you...
sweet honey
|
|
|
|
|
Hi folks I have a stored procedure which selects the following:
sbu_id
profit_id
sub_id
act_id
acct_id
acct_name
policy_nbr
policy_eff_date
netPremium
Now I have these names in the header of the datagrid. I would like to change this. This is a winform
application.
Looking at the below sub routine I tried to the mapping for one field. Nothing came out. Can someone help me.
Private Sub btnApplyBoundEDB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnApplyBoundEDB.Click
'get connection string
Dim connstring As String = System.Configuration.ConfigurationSettings.AppSettings("FinSolMainDBConn")
Dim cnn As SqlClient.SqlConnection = New SqlClient.SqlConnection(connstring)
Dim cmd As New SqlClient.SqlCommand
Dim da As New SqlClient.SqlDataAdapter
Dim ds As New DataSet
Try
cmd.CommandText = "dbo.stp_NewRen_Override"
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = cnn
da.SelectCommand = cmd
'create parameters to pass to command
Dim prm As SqlClient.SqlParameter
prm = cmd.Parameters.Add("@sSbu", SqlDbType.NVarChar, 5)
prm = cmd.Parameters.Add("@dFirst", SqlDbType.DateTime, 8)
prm = cmd.Parameters.Add("@dLast", SqlDbType.DateTime, 8)
cmd.Parameters("@sSbu").Value = cboSBU.SelectedValue
cmd.Parameters("@dFirst").Value = C1PeriodFrom.Value
cmd.Parameters("@dLast").Value = C1PeriodTo.Value
da.Fill(ds)
Catch ex As Exception
MsgBox("Error: " & ex.Source & ": " & ex.Message, MsgBoxStyle.OKOnly)
End Try
'Dim dt As New System.Data.DataTable("testdatatable")
'Dim dc As System.Data.DataColumn
' Dim dr As System.Data.DataRow
Dim textboxc1 As New DataGridTextBoxColumn
Dim DataGridTableStyle1 As New DataGridTableStyle
textboxc1.MappingName = "sbu_id"
textboxc1.HeaderText = "SBU"
textboxc1.Width = 80
' Add table style to grid
DataGridTableStyle1.MappingName = ds.Tables(0).ToString
-----------------------------------------------------------------------------------------------------------------------------
I have also went though and changed the following below in hopes that this will work also to no avail.
C1TrueDBGrid1.DataSource = ds.Tables(0)
' sbu_id
'dc = New DataColumn
'dc.DataType = System.Type.GetType("System.String")
'dc.ColumnName = "SBU"
'dt.Columns.Add(dc)
' profit_id
'dc = New DataColumn
'dc.DataType = System.Type.GetType("System.String")
'dc.ColumnName = "ProfitId"
'dt.Columns.Add(dc)
' sub_id
'dc = New DataColumn
'dc.DataType = System.Type.GetType("System.String")
'dc.ColumnName = "SUBId"
'dt.Columns.Add(dc)
Basically I am testing it with one field and nothing is working as of yet.
Any advice on the code above will be appreciated.
Thanks
|
|
|
|
|
In treeview, add a key and a name.
treeview1.nodes.add("key","name")
How to get the key?
Thanks!
|
|
|
|
|
hrmmz
As the old days ... This isn't correct but you'll get the idéa
dim myNode as TreeNode
set MyNode = treeview1.nodes(Name)
msgbox(myNode.Key)
maybe .....
msgbox(treeview1.nodes(Name).Key)
//Maw
|
|
|
|
|
I need to generate barcode, but i only want the numbers of barcode, whitout images.
Someone can help me.
Thanks.
|
|
|
|
|
Generate it from what source ? There are some articles on barcodes on this site.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I’m trying to drag & drop listview items between two instances of my app. The actual data that’s passed in DoDragDrop is an arraylist that’s been serialized to a memorystream. The contents of the arraylist are objects of a simple, serializable custom class that allows the recipient listview to reconstruct the dragged listitems. (the contents of the arraylist actually don’t matter…they can be simple integers and the issues in this post remain the same)
When I’m dragging & dropping within an instance of my app, e.Data from the DragDrop event is a DataObject and I can extract my memorystream, deserialize it, and I’m good. However, when I drag & drop to another instance of my application, e.Data is a System.__ComObject. Attempting to extract my data with the normal e.Data.GetData method results in a memorystream that’s, according to the Locals window, a System.Runtime.Remoting.Proxies.__TransparentProxy, which is beyond the scope of my VB knowledge. Regardless, it doesn’t deserialize, and now I’m stuck.
So could someone kindly explain what I need to do to the __ComObject to get my memorystream out? Here’s my code:
If e.Data.GetDataPresent("System.IO.MemoryStream") Then
Dim Formatter As New BinaryFormatter
Dim Stream As New System.IO.MemoryStream
Dim DropList As New ArrayList
Stream = e.Data.GetData("System.IO.MemoryStream")
Stream.Position = 0
DropList = Formatter.Deserialize(Stream)
Any help would be appreciated.
Neil
|
|
|
|
|
I am trying to create a program for my company which will create new folders for incoming employees. This folder needs to be created and the sharing permissions need to be set programmatically (VB.NET). I know how to create the folder, but setting the permissions is posing a problem. If anyone has any advice on the matter, I would greatly appreciate it.
|
|
|
|