|
Hello!
I need some help in vb.net to solve transparency between layered objetcs. If you help me to figure out I really appreciate it. Here is the brief scenerio:
I have one form what uses magenta as a transparent color and then I have a image (Picturebox) a donut with alphachannel transparency. So the donut's middle is using alpaha transparency. I have a picture box with a JPG image and another a label. All these tree are inside a panel object. How can make all these three objects transparent to each other? like JPG will be on the back and then label will be above it shown as transparent and then donut will be on the top but when I look at donut, its alphachannel transparent section should show the objects its behind.
Thank you very much!
Bedri
email: bckurd@e-kolay.net
Bedri
email: bckurd@e-kolay.net
|
|
|
|
|
First step - if you want to draw something fancy, do it yourself, instead of using a picture box. i.e. handle OnPaint and draw the image yourself, setting it's transparency by using the ImageAttributes class.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I have used the following code to print my file in dos mode. While printing it also prints the name of the file and its page no.
***
Dim oProc As New Process
Try
oProc.StartInfo.FileName = sFileName
oProc.StartInfo.Verb = "Print"
oProc.StartInfo.CreateNoWindow = True
oProc.Start()
Catch e As Win32Exception
If e.NativeErrorCode = ERROR_FILE_NOT_FOUND Then
Console.WriteLine((e.Message + ". Check the path."))
Else
If e.NativeErrorCode = ERROR_ACCESS_DENIED Then
Console.WriteLine((e.Message + ". You do not have permission to print this file."))
End If
End If
End Try
****
But I don't want this line no. and file name. How do i remove it while print?
Regards
Rams
Be simple and Be sample.
|
|
|
|
|
You're not printing in DOS mode. You're actually launching Notepad to print a *.TXT file (or whatever other extension). There's no way to tell Notepad to change its Page Setup settings from outside the interface. You'll have to use a differnet method to print them, like supplying your own printing code perhaps.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 14:18 Saturday 17th December, 2005
|
|
|
|
|
hi,
i m converting a vb project into .NET.
in crystal report "shape query" have been used.
it runs smoothly in vb. but gives error in .NET.
data from child table is not accessible.
i tried with ADODB.recordset,oledb.recordset,dataset n data reader but is unable to come out of error.
is it possible to use shape query in .NET?
please try to solve my problem!
|
|
|
|
|
Hi all,
I am getting a Security Exception while trying to write to the event log. I am logged on as an Administrator, have set the trust level to high and identity impersonate = true in the web.config file, and have created a new key called test in application in the event log and set the read and full control to user that I’m logged on as (i.e. Administrator) .I have set the event source of the event log I have created to test. I’m getting the following exception.
Server Error in '/ASP.NetProjects/EventLog' Application.
--------------------------------------------------------------------------------
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I'll be really glad if anybody could solve my problem as i have been beating my head over this.
Thank you,
Aanchal.
|
|
|
|
|
I need some code in VB.Net that will get all the mac address
of all the network cards on our network. I beleive a broadcast
command would be the best way to do this. Does anyone know
where I can find some code to do this?
|
|
|
|
|
Well, you have one problem. You can't get the MAC address of any NIC that's not on the same subnet that your app is running on. ARP requests won't hop routers.
The only way around this is to use WMI and query each Windows machine for it's list of network adapter configurations (Win32_NetworkAdapterConfiguration). This won't work with non-windows machines and will have problems with Windows versions below NT4 SP3.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for responding.
That is a good point.
Well for now lets say I just want to look at a subnet.
How could I do that in VB.net?
If I can get a list of the IP address I can query them
for their mac address.
What I am tring to do is look for a specific mac address.
This address will have the same first 3 numbers. These
are network devices that won't be attached to a computer.
Any help would great.
|
|
|
|
|
I need help. I want to save changes made to my data set through a datagrid to the main database. here is my code.
If myDataSet.HasChanges Then
myDataAdapter.Update(myDataSet.Tables("myDataTable"))
End If
each time I run it, I get the error:
"An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dll
Additional information: Update requires a valid UpdateCommand when passed DataRow collection with modified rows."
jbeggie
|
|
|
|
|
How are you building your DataAdapater object. It looks like your missing the SqlCommand that actually updates the database. Just grabbing a dataset from a Sql SELECT statement will not let you write the changes back to the database. You need to supply the UPDATE commands to do it, or supply the DataAdapter with the SqlCommandBuilder object that uses the SELECT command to build the UPDATE, INSERT, and DELETE commands for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Unfortunately I don't have the advantage of working in .NET yet...my question is this...In VB6 is there anyway to see the Windows Generated Designer code like you can in .NET?
I need to pass a parameter into a new form that Im creating and would like to modify the constructor...anyone have ideas on this?
Thanks
Jerami Tainter
Computer Programmer
jtainter@gmail.com
|
|
|
|
|
There is no Designer generated code like there is in .NET. The way I used to do it was to put a public method into the new form's code and call that to init the form after creating an instance of it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Tainter wrote: In VB6 is there anyway to see the Windows Generated Designer code like you can in .NET?
If you open your *.frm file in Notepad, then you can see its form configuration at the top of the file. But this isn't code. You really shouldn't be messing with this config.
Tainter wrote: I need to pass a parameter into a new form that Im creating and would like to modify the constructor...anyone have ideas on this?
VB6 forms don't have constructors. The next best thing that you've got is the FormLoad event, but you can't pass anything to it. You'll need to create a Function/Subroutine to pass in data to be stored in member variables before showing your form.
|
|
|
|
|
Thanks for the input guys
Jerami Tainter
Computer Programmer
jtainter@gmail.com
|
|
|
|
|
Hi, there is a method in Managed C++ defined as
virtual void CargarXMLEntrada(String *inputXMLPath) = 0;
I'm new to interop and havent been able to find the way to override that method in VB6 or if interop is the way to go, anybody knows how can this method be overriden?
Thanks in advance
Isaac B
|
|
|
|
|
I have a 32bit BMP that I am trying to save as black and white. My best guess was that I could use the Clone method. Clone should allow me to set the pixel format as follows:
<br />
Dim bmpBlackWhite As Bitmap<br />
Dim bmpColor As Bitmap<br />
<br />
bmpColor= New Bitmap(100, 100 , PixelFormat.Format32bppRgb)<br />
bmpBlackWhite = New Bitmap(100, 100 , PixelFormat.Format1bppIndexed)<br />
<br />
bmpColor = GetColorImage<br />
<br />
bmpBlackWhite = bmpColor.Clone(New Rectangle(0, 0, 100, 100), PixelFormat.Format1bppIndexed)
When I run this code I get a "Out of memory error" on the Clone command.
Does anyone know either how I can fix this code, or have another method that can save a color BMP as black and white??
Thanks.
|
|
|
|
|
Yeah, you can't convert any of the RGB formats to an Indexed format.
You might want to look at this[^] article by Christian Graus.
The techniques can't be ported to VB.NET because they use unsafe code, but you can still use them if you put them in a library and call the methods from VB.NET.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a table with 2 fields: ProductCode(Text) and InventoryNo(Int). I'd like to display the largest integer in InventoryNo field that has the same ProductCode. my SQL query is :
SELECT MAX(InventoryNo) FROM StockTable WHERE ProductCode = '&txtprdcode.Text&'
The problem is, the outcome I got was the largest integer regardless of its ProductCode (The output was more like the largest integer in InventoryNo Column).
What seems to be the problem?
TQ
|
|
|
|
|
SELECT MAX(InventoryNo) FROM StockTable WHERE ProductCode = & "'"&txtprdcode.Text&"'"
if InventoryNo = ProductCode then
'some code
else
'mismatch
endif
Hope this helps,
-- modified at 10:53 Friday 16th December, 2005
|
|
|
|
|
We're needing to embed into a program - a piece that will force the user to log in again - this is necessary for FDA Part 11 - and then have the app verify the credentials which were just entered against the active directory. Unfortunately the app we have isn't er/esig capable - so we're having to customize it - but so far, haven't found anything we could use and not have to write from scratch...
anybody know of anything useable?
|
|
|
|
|
I have to write app's that are 21 CFR part 11 compliant too.
(To everyone else, CFR stands for Compliance to Federal Regulations.)
I don't think Windows does enough to satisfy this. I (and my competitors) typically have to create apps having their own user accounts and login handling in order to satisfy the FDA's requirments. Requirements such as password aging, auto-logout, user authentication, and audit trails. Windows won't do those last 2 bits for you.
|
|
|
|
|
Hi all,
Can someone tell me how to use USB port for communication in VB?
Thanks in advance,
sushma
|
|
|
|
|
That depends entirely on the device you want to talk to. There is no such thing as "generic" code that lets you talk to any device on USB. Most of teh time, this will require lower level calls to the devices drivers.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanx so much for responding to my post.I must establish communication between two PCs through USB port.I have no idea of how to go about it.Please tell me what are the pre-requisits for programming a USB port.
Thanx again,
sushma
|
|
|
|