| API calls and &H1, &H2, &H4, &H8, ..., &H10, ..., H40000, .... |
|
 |
Index ‹ Visual Studio ‹ Visual Basic
|
- Previous
- 1
- Visual Studio C++ >> Seeking opinions of best practice on splitter windowsHello
When having a splitter window, i.e. a window that is about 5 pixels wide and
goes between the left-hand treeview and the right hand control, be it mdi
client window or listview or whatever, is it generally preferred practice to
have the left and right windows resize as the user is dragging the splitter
window, or to wait until the splitter window is dropped.
I notice that most Microsoft applications (e.g. Windows Explorer, Outlook
Express) go for the former, however it seems Visual Studio .NET adopts the
latter strategy.
I've coded my application so that it works like Visual Studio .NET. However
I can't make the splitter window adopt that transparent-gray crosshatch
pattern when it is being dragged, anybody know off-hand what the background
needs setting to to make it like that?
And also, which is the 'best-practice' method, or doesn't it generally
matter either way?
- 2
- Visual Basic >> PDW Msg "...already been added..."When packaging my project, I am asked to "choose the folder where your
package will be assembled." I click the "New Folder" icon and make a folder
and select next. There is a processing delay (only 550MHz machine) and the
drive rattles, then I am prompted with "Afile with this name has already
been added to the list of files." You only have the choice to click OK.
Does anyone know what causes this message?
Regards,
Jim
- 3
- Visual Basic [VB] >> Using VB 6.0 Interface in vb.net causes a problemHi,
I have an interface in vb 6.0. It has a property set member, which takes a
parameter by reference. When I try to implement this interface in my vb.net
project it gives me an error saying that "cannot implement property set
because there is no matching property on interface". I think .NET does not
allow parameter to be passed ByRef in property statements.
here is my property set statement in vb 6.0 interface called IName
Property Set Name(ByRef objName as object)
End Property
VB.NET code looks like this
Public WriteOnly Property Name() as System.IntPtr implements IName.Name
Set (ByVal value as System.IntPtr)
end set
End Property
There is an underline below IName.Name. When I put my mouse over it then it
says "Cannot implement IName.Name because there is no matching property on
Interface IName". I tried changing the System.IntPtr to System.Object but it
gives the same result. I cannot change vb 6.0 interface to accept parameter
ByVal instead of ByRef because then, I have to change all other existing
components that already are implementing this interface.
Your help is appreciated.
Thanks
- 4
- Visual Basic [VB] >> Class controling form settingsI am wondering if it is possible to make something like the following work:
Public Class myTestSettings
Public Property onTop() As Boolean
Get
Return Form1.CheckBox1.Checked
End Get
Set(ByVal Value As Boolean)
Form1.CheckBox1.Checked = Value
End Set
End Property
End Class
Second question: if it is possible, is it advisable?
I am wanting to serialize this information to an XML file. I'm exploring
this as a possibly better way to accomplish this.
Thanks in advance,
Matthew
- 5
- MFC >> Multithreading, Converting a Byte Array to a Hex String, Simultaneously..So.. my problema: I'm reading in a massive amount of data into a BYTE
array buffer (size 64096 bytes, and about 1MB every 5 seconds) and
writing to a file. I want to grab the info, translate it into hex, and
spit it back out on the screen to display what I am receiving. So far
I have a thread doing the receiving and writing to file, and another
thread which is supposed to be translating and spitting out to a
multiline edit box.
This is probably not a good way to do it, and I was wondering if anyone
knew a better way?
Thx,
kefkastudio
- 6
- MFC >> Message which is called everytime a CFormView is createdHallo,
I have a program with a CSplitterWnd which divides 2 CFormViews.
See link: http://wwwstud.fh-zwickau.de/~pafe/geb/1.jpg
When I start the program the ListBox (CListView) on the right side
gets filled in the method OnInitialUpdate().
When I navigate through the tree then the views on the right side are
replaced.
When I come back to the element, that displays the form with the
List-Box, my ListBox is not filled with the data I provide in
OnInitialUpdate.
See link: http://wwwstud.fh-zwickau.de/~pafe/geb/2.jpg
Now my question is:
Where do I have to put the code (what message do I have to catch) to
get the ListBox filled everytime I select the corresponding
tree-element.
Thx 4 ur help
Pedde
- 7
- 8
- MFC >> Tooltip causes an ASSERT() in a child dialog boxHello experts,
I already posted about my problem a couple of days ago, but it's not
solved yet and I have some more details about it.
Using MS VC 6.0 and Vista.
I create a CTabCtrl control in a dialog box. For each tab, a child
dialog box contains a bunch of controls (CEdit, CComboBox...). I can
display tooltips for each control, no problem.
The problem is that when the cursor (I mean the mouse) leaves a
control, if it enters the tooltip area, I get an ASSERT() warning:
In WinCore.cpp
void CWnd::AssertValid() const
{
...
// should be a normal window
ASSERT(::IsWindow(m_hWnd));
...
}
This occurs only when the dialog boxes displayed in the tabs are CHILD
dialog boxes. If I choose "Overlapped" or "Popup", it works (but I
need a child dialog box).
What should I do to avoid this problem?
TXS
Phil
- 9
- Visual Basic >> Print preview and print for picture controlI have a form that acts as a container for a picture control. I am
drawing pictures in the picture control, and would like to add print
preview and print functionality - but I don't know how to do this.
i would be grateful if someone could provide a code snippet that shows
how I may ;
1). print preview an image displayed in a picture control
2). print the image displayed in the picture control
- 10
- Visual Basic [VB] >> enable tabcontrolon my form I have a checkbox and a tab control when the checkbox is true I
wish to enable the controls on a single page of the tab control, is this
possible or do I need to enable each control on the tab control page.
if you could supply and example of code it would be much appreciated
thanks phil
- 11
- VB Scripts >> Accessing a c#.net created COM object in vbscript...Hey guys.
How do I access a COM object in vbscript?
I created the object using c#, but am unsure :
- which guid to use
- which object id
- whether i should use the <OBJECT> tag at all
- how to handle create object...
my structure for the COM object is as follows ( created following the
tutorial found at http://www.csharphelp.com/archives/archive281.html )
//----------------------------------------- start c# code
namespace BIF_COM_API
{
//
// Interface Declaration
//
[Guid("49B9D855-182A-4064-A362-95D7D10C4E15")]
public interface BIF_Interface
{
//
// DispId declarations
//
}
//
// Events Interface
//
[Guid("09603A1F-E672-4460-9F66-D012CE9F9842"),
InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface BIF_Events
{
}
//
// COM object instantiation
//
[Guid("1995FED2-2C21-4659-A5E4-B832C0BD4434"),
ClassInterface(ClassInterfaceType.None),
ComSourceInterfaces(typeof( BIF_Events ))]
public class BIF_Instantiation : BIF_Interface
{
//
// class implementation
//
}
}
//----------------------------------------- end code
and my current vbscript code is
//----------------------------------------- vbscript code
<!-- header stuff -->
<SCRIPT LANGUAGE="VBScript">
<!--
option explicit
sub VB_Click
Dim bifapi
bifapi = CreateObject ( "BIF_Instantiation" )
' error here, can't create
object
bifapi.SetDestinationQueueName "Local_In"
bifapi.Send
end sub
-->
</SCRIPT>
</HEAD>
<OBJECT
classid="clsid:49B9D855-182A-4064-A362-95D7D10C4E15"
id=BIF_COM_API.BIF_Interface
VIEWASTEXT>
</OBJECT>
<BODY>
<!-- body stuff.... -->
//----------------------------------------- end code
thanks for your help in anticipation.
Daniel.
- 12
- VB Scripts >> Variables from one script to anotherHi...
I posted this before, but probably didn't explain my self well...
I need to have a script that declares and sets a value for some vb
variables, and want to have the value in these variables available in other
script...
Here is what I do :
I have a master script that calls other scripts...
1st script called from master script, it declares and sets values for some
variables ...
ex : Public appver1
appver1 = "V9_4_2"
2nd script called from master script would use the variables set in 1st
script to do execute actions with it...
ex : WshEnv("Var1") = appver1
How can this be done ...
The value is "appver1" is not necessary outside of the vb environment...
Reason is that 1st script will be modified by a lot of people, but don't
want them to modify other script...
Thanks very much !!!
--
--
Houman Yahyaei ( CCNA, MCSE Win 2000/NT 4.0, MCT )
IT Training and Consulting
www.formationhy.com
Houman@formationhy.com
- 13
- Visual Basic [VB] >> Unable to access c# code from VB.NET in the same solutionThis is a little puzzling,
I have a solution (SolutionA)
and have about 14 Projects in it that are VB.NET
I have to use some code which is C# and thought I could just add a reference
and use that to call the methods in the file. Seeems not to be the case, I
have added the reference but the project's classes or project reference does
not show up on the autolist that imports gives.
essentially the solution doesn't see the csharp class.
any ideas?
- 14
- 15
- MFC >> newbie quesion on missing clw fiileHi,
I downloaded several VC++ projects from Internet, I am able to open them
using VC++ 6.0, but when I tried to open class wizard, I got error message
that the clw file is missing, do I want to build it from the source files.
When I click yes, I saw all the .cpp, .h ... My quesion is, which files
should I choose to build the clw file?
TIA
|
| Author |
Message |
Duckysan1

|
Visual Basic >> API calls and &H1, &H2, &H4, &H8, ..., &H10, ..., H40000, ....
Okay, I came into VB without *ever* learning about the hexadecimal notation.
What do the following mean and what decimal numbers do they translate to?
&H10 (is this equal to 16?)
&H400 (is this equal to 256?)
If they are, why do I use these in API calls in lieu of 16 and 256?
Thank you ever so much!
--
Joe
VBA Automation/VB/C++/Web and DB development
Visual Studio229
|
| |
|
| |
 |
| |
 |
Index ‹ Visual Studio ‹ Visual Basic |
- Next
- 1
- Visual Basic [VB] >> binarywriter.write loop is causing 100% cpuHi all!
I have some files that are basically a TIF with an ASCII header.
I wrote an app that reads in the file, pulls some values from the
header and writes out everything after the header as a new file.
I'm using binaryreader and binarywriter.
Everything functions fine, but the following loop causes 100% CPU
usage and I can't figure out how to get around this.
Here is a code sample that lists the declarations and the loop that's
causing the high CPU usage:
----------------------
Dim fsIn As FileStream = New FileStream(filename,
FileMode.OpenOrCreate)
Dim fsOut As FileStream = New FileStream(fsIn.Name & ".tif",
FileMode.Create)
Dim binWriter As BinaryWriter
Dim binReader As BinaryReader = New BinaryReader(fsIn)
binWriter = New BinaryWriter(fsOut)
Do While binReader.BaseStream.Position <
binReader.BaseStream.Length
binWriter.Write(binReader.ReadByte)
Loop
binWriter.Flush()
binWriter.Close()
binReader.Close()
binReader = Nothing
fsIn.Close()
fsIn = Nothing
fsOut.Close()
fsOut = Nothing
----------------------
Obviously I left some stuff out, but that's the part that's using the
CPU.
The binReader.BaseStream.Position picks up where the loop to find the
end of the header left off.
If anyone has any suggestions or tips as to what's going on and / or
how I can get around it I'd really appreciate it!
Thanks!
- 2
- Visual Basic >> Storing/Loading queriesHi all,
In my VB application, I have some listviews and some
comboboxes. The code forms a query based on the values
selected in these components and queries a database.
Now, I want to give the user the facility of saving and
loading queries, that is, when a user selects a stored
query the corresponding values should be shown selected in
the list boxes and comboboxes.
Could anyone give me an idea about how to go about it, as
to how should I store these queries (in files or in the
databse itself) and how to populate the components based
on these queries, when they are loaded? Or where could I
find a sample of code doing similar stuff.
Pranav
- 3
- MFC >> owner of teh serial port handleHi, experts....
I need to know the application name that open a serial port (e.g. com1). My
goal is to say to the user to close the application befora run mine
Any ideas ?
Thanks in advance
- 4
- Visual Basic >> How to move cursor position by code ?Hi all
Is that possible to move cursor position by code inside picture box.
I have set picturebox.scale (0,1000)-(1000,0)
How do I move cursor Automatic by code
For eg. I have to set cursor in 100,500 in picturebox
Thanks
Amrit
- 5
- Visual Basic [VB] >> xlSheet.get_range not thereI'm trying to use the get_range method on an Excel sheet, but when I type
'xlSheet.' I don't see the method in the drop-down. I see Cells, Name, etc,
but I don't see any method starting with a "g". This is my code:
Dim workbook As Excel.Workbook =
workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet)
Dim xlSheet As Excel.Worksheet = CType(workbook.ActiveSheet, Excel.Worksheet)
xlSheet.get_Range(.......) 'I CAN'T DO THIS
I do have "get_range" available in my C# project, but not VB project.
According to documentation it should be available for VB as well. I don't
know what I'm doing wrong.
I would appreciate your help. Thank you!
- 6
- Visual Studio C++ >> good code to return const reference to function local object?Hello everyone,
1. Returning non-const reference to function local object is not correct.
But is it correct to return const reference to function local object?
2. If in (1), it is correct to return const reference to function local
object, the process is a new temporary object is created (based on the
function local object) and the const reference is binded to the temporary
object, and the life time of the temporary object is extended to the life
time of const reference?
Or no need to create such a temporary object, just let the const reference
binded to the function local object itself?
thanks in advance,
George
- 7
- 8
- MFC >> thread safetyIs it (multithread) safe to access static member (another class pointer)
of some class (from multiple threads)?
- 9
- 10
- 11
- 12
- 13
- VB Scripts >> getting remote time from vbscriptHi all.
I would like to get the time on a remote Windows host from vbscript.
I would prefer, if possible, to avoid using the NET TIME command.
I tried the LocalDateTime method provided by WMI, but that requires
administrative rights on the remote host, which is not an option for
me.
Does anyone know another way to retrieve the time remotely without
running another executable like net.exe?
Thanks,
John
- 14
- 15
- Visual Basic >> send parameters to an oracle reportHello,
I want to call an oracle report from VB6. I have added the
OracleReportingControl and set everything. I can only set one value for the
UserDefinedparameters attribute.
How can I set all the parameters that I have in my Oracle Report from VB6?
Thank you,
Moji
|
|
|