Create ActiveX in .NET Step by Step[^] I used this to create the activex component, maybe 1 of u guys can help me with displaying an image from the clipboard on the page using javascript, or display it using activex, just for info , this is a intranet site, will only be used by employees, not by public,
Armandt__
Posts
-
ActiveX Webcam -
ActiveX WebcamHi, im trying to use the webcam on a webpage, I created the control in C# , when working with a normal windows form app, it works fine , displaying the image that it gets from the webcam, but when i convert it into a activex control so that i can use the functionality on a aspx page , the webcam gets initialized but i only see a black box where the cam feed is supposed to be, ive tried a lot of ways now but i cant seem to display a picture in the picture box in the activex control, it just stays black, so if someone could please assist me in do this, either how to use the webcam on a aspx page or how to display a image saved on the client pc (when i save an image on the client pc with the activex control it saves fine, it just does not display on the page) I need this to take pictures of employees ect via the website
-
Setting BackColor of pannelgot it right, i put , <%# System.Drawing.ColorTranslator.FromHtml(Eval("ColorCode")) %> thanks anyway.
-
Setting BackColor of pannelHi , ive got a asp.net vb web app, now i save a color code the a sql database and the show the data in a c1webgrid, now what i want to do is put a panel in template column and set the backcolor of the panel acording to what is in the database Now what i did was C1WebGrid:C1TemplateColumn <ItemTemplate> <asp:Panel ID="Panel4" runat="server" BackColor='<%# Eval("ColorCode") %>' Height="20px" Width="20px> asp:Panel </ItemTemplate> </C1WebGrid:C1TemplateColumn> but it gives me a System.InvalidCastException: Specified cast is not valid error if someone can please help me with this, Thanks
-
ASCX user control help!!sory about the way my posts are looking , they dont display right on my side, anyways , i know its a different window , i want to use it with the ajaxmodalpopup extender , the way i want to create the control must be like a template of some sorts , I'm putting in a label header which can be changed with the control's properties and then in the middle i want a place holder where i can place buttons or tables and stuff, like this <tst:mycontrol runat ="server" id = "tst1" HeaderText = "Error"> <content> ....... (maybe table with message in and a button to click ok) </content> </tst:mycontrol>$
-
ASCX user control help!!Thanks for the reply I know how to create and use the ascx controls but i want to add extra functionality to it let me try and explain it in another way. I want to make like for e.g. the asp panel it would be used like this
now what i want to do is like the same way you use the panel to place something inside , i want to use my custom control just again , its a popup window and i would like to use some sort of place holder where i can place stuff in for e.g. i would want to use the window for error messges or to put in a few textboxes and labels. like this
-
ASCX user control help!!Please could someone help me I want to create a popup window. Now i've created the window in a ascx file. Now what i would like to do is make the control work like other asp controls for e.g.
......
what i would like to to is add whatever into the content space. I dont realy know alot about creating my own controls but is this posible??
-
How to prevent displaying ID= in my URL querystring?I'll sugest using session objects, it's the easiest way. oh and if you didn't know , you can place any type of object into a session variable you'll just have to convert it back to the type of object you want when you use it, and another plus , its value can be used on any page.
-
help asp.net,web.config,connectionstringIf the database is on the pc you are coding on , change >> Data Source=SERVER\SQLEXPRESS to Data Source=(local)\SQLEXPRESS
-
Button Click event not working inside AJAX popupcontrol and UpdatePanelHi, this is from the tutorial site, look through the code, and adapt yours like this,
<div class="demoarea"> <div class="demoheading"> PopupControl Demonstration</div> Enter date for new reminder: <asp:TextBox ID="DateTextBox" runat="server" Width="80" autocomplete="off" /><br /> <br /> <asp:Panel ID="Panel1" runat="server" CssClass="popupControl"> <asp:UpdatePanel runat="server" ID="up1"> <ContentTemplate> <center> <asp:Calendar ID="Calendar1" runat="server" Width="160px" DayNameFormat="Shortest" BackColor="White" BorderColor="#999999" CellPadding="1" Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" OnSelectionChanged="Calendar1_SelectionChanged"> <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" /> <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" /> <SelectorStyle BackColor="#CCCCCC" /> <WeekendDayStyle BackColor="#FFFFCC" /> <OtherMonthDayStyle ForeColor="#808080" /> <NextPrevStyle VerticalAlign="Bottom" /> <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" /> <TitleStyle BackColor="#999999" Font-Size="7pt" BorderColor="Black" Font-Bold="True" /> </asp:Calendar> </center> </ContentTemplate> </asp:UpdatePanel> </asp:Panel> <ajaxToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server" TargetControlID="DateTextBox" PopupControlID="Panel1" Position="Bottom" /> Reminder message: <asp:TextBox ID="MessageTextBox" runat="server" Width="200" autocomplete="off" /><br /> <br /> <asp:Panel ID="Panel2" runat="server" CssClass="popupControl"> <div style="border: 1px outset white; width: 100px"> <asp:UpdatePanel runat="server" ID="up2"> <ContentTemplate> <asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostB
-
AJAX ValidatorCalloutExtenderHi if anyone could please give me pointers on how to do this if it's possible I have a textbox and a button next to each other , now the user needs to click on the button to fill the textbox with a certain value. Now on the validation side , if the textbox has no value the requiredfield validator will give it's message calling the ValidatorCalloutExtender giving that ajax popup. Now till there it's easy enough, but the thing is I need to display the ValidatorCalloutExtender pointing at the button and not the textbox. Please help on this...
-
RPC service unavailableIm trying to print to a printer shared on a network , keep on getting this error Im allready using impersonation on the server where the web app is hosted If anyone can please give me pointers , I am able to print to some printers on the network, is there maybe some settings on the client pc a need to change for the printer or something , Im realy stuck on this one :confused::confused: X|
-
Network printingOk so no reply from anyone, so I'll leave what I got When using network resources the asp.net "user" doesn’t have the required rights. So , what you need to do is impersonate a user on the sever having the rights the access the network . Create a class, call it whatever you want, I’ll call this one impersonation and add the following: Some of the imports won’t be needed
Imports Microsoft.VisualBasic
Imports System.Web.Security
Imports System.Security.Principal
Imports System.Runtime.InteropServices
Imports System.Threading
Imports System.Configuration
Imports SR = System.Reflection
Imports System.Text
Imports System.Web.UI.WebControlsPublic Class Impersonation
Private Const LOGON32_PROVIDER_DEFAULT As Integer = 0
Private Const LOGON32_LOGON_INTERACTIVE As Integer = 2
Private Const LOGON32_LOGON_NETWORK As Integer = 3
Private Const LOGON32_LOGON_BATCH As Integer = 4
Private Const LOGON32_LOGON_SERVICE As Integer = 5
Private Const LOGON32_LOGON_UNLOCK As Integer = 7
Private Const LOGON32_LOGON_NETWORK_CLEARTEXT As Integer = 8
Private Const LOGON32_LOGON_NEW_CREDENTIALS As Integer = 9Private Shared ImpersonationContext As WindowsImpersonationContext Declare Function LogonUserA Lib "advapi32.dll" ( \_ ByVal lpszUsername As String, \_ ByVal lpszDomain As String, \_ ByVal lpszPassword As String, \_ ByVal dwLogonType As Integer, \_ ByVal dwLogonProvider As Integer, \_ ByRef phToken As IntPtr) As Integer Declare Auto Function DuplicateToken Lib "advapi32.dll" ( \_ ByVal ExistingTokenHandle As IntPtr, \_ ByVal ImpersonationLevel As Integer, \_ ByRef DuplicateTokenHandle As IntPtr) As Integer Declare Auto Function RevertToSelf Lib "advapi32.dll" () As Long Declare Auto Function CloseHandle Lib "kernel32.dll" (ByVal handle As IntPtr) As Long Public Shared Function ImpersonateValidUser(ByVal strUserName As String, \_ ByVal strDomain As String, ByVal strPassword As String) As Boolean Dim token As IntPtr = IntPtr.Zero Dim tokenDuplicate As IntPtr = IntPtr.Zero Dim tempWindowsIdentity As WindowsIdentity ImpersonateValidUser = False If RevertToSelf() <> 0 Then If LogonUserA(st
-
Network printingHi everyone I have searched the whole day long now and cant seen to find, maybe searching in the wrong places:confused: If someone could please help me I have a aspx vb project using crystal reports, now what I want to do is , when the user hits the print button the report should print to a printer shared on a computer connected to the network. Now this is working when I run the app in visual studio but when its published to the iis it gives me a "access denied" error when i set the printer as \\pcIP\printername , or when i view the printer queue it says, "error - printing" when i set the printer as a normal printer on the server giving it a new port looking at the same place as before this is how i do it create a report doc -> rpt rpt.PrintOptions.PrinterName = "\\IP\printer" rpt.PrintToPrinter(1, False, 0, 0) any help would be great
-
Download and InstallThank you , I'll look into it, got fed up with all the security restrictions, made a exe to install all the fonts , gave the user only the option of running the app and not downloading it, used this tag to modify the download dialog
-
Menu bar, address bar ectIs there a way of removing or hiding the menu bar and address bar of the browser without using a .hta file or doin a javascript window.open, I want the web app to look like its running inside a normal window
-
Download and InstallI found some script to do it but it only works on server side Dim objStream objStream = CreateObject("ADODB.Stream") objStream.Type = 1 ' adTypeBinary objStream.Open("URL=http://10.52.223.67/PPE/Font/FRE3OF9X.ttf") objStream.SaveToFile("C:\Temp\FRE3OF9X.ttf", 2) ' adSaveCreateOverWrite objStream.Close() objStream = Nothing Const FONTS = &H14& Dim objShell Dim objFolder objShell = CreateObject("Shell.Application") objFolder = objShell.Namespace(FONTS) objFolder.CopyHere("C:\Temp\FRE3OF9X.ttf") on the client side I get the following error System.Runtime.InteropServices.COMException: Write to file failed [COMException (0x800a0bbc): Write to file failed.]
-
Download and InstallThe site is only going to be used inside the company, so no worries about unwanted stuff to be downloaded, The font I need is for a barcode and its nog going to be the same all the time, its for label printing. I know the easiest way of making sure its on the client side is to manually installing the font where the app is going to be used, but its not allways going to be guaranteed the user will be on the same pc, so in that case if the font is not dedected it must be placed in the Windows/fonts directory
-
Download and InstallI have a aspx vb project, im testing to see if a certain font is installed , if its not it should be downloaded and installed on the client pc, is there some way of doing it in the background without the client user knowing of it being done, or any other suggestions are welcome thanx
-
Determine Installed Apps on client pcI'm using a type of barcode font, if the font is not installed on the client pc the browser uses a default font I used 2 spans on the default page( hidden) with a series of characters If the length of the two spans are the same with the font is not installed on the client pc,